// hardhat.config.js
require("@nomiclabs/hardhat-waffle");
require('@openzeppelin/hardhat-upgrades');
require("@nomiclabs/hardhat-etherscan");

/**
 * @type import('hardhat/config').HardhatUserConfig
 */
module.exports = {
  solidity: "0.8.2",
};



// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
  const accounts = await hre.ethers.getSigners();

  for (const account of accounts) {
    console.log(account.address);
  }
});

var privateKey = "privateKey";
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more

/**
 * @type import('hardhat/config').HardhatUserConfig
 */
module.exports = {
  defaultNetwork: "hardhat",    // 指定默认网络
  networks: {                   // 配置可能用到的所有网络连接信息
    hardhat: {                  // hardhat框架集成了 hardhat node，不需要配置url等信息
    },
    ropsten: {
      url : "https://ropsten.infura.io/v3/9236f2a0642448e6971361d2294db98b",
      accounts: [privateKey]
    },
    bscTestnet: {
      url: "https://bsc-testnet.nodereal.io/v1/d70839ccb02b46d1b37598011eafc0c7",
      chainId: 97,
      gasPrice: 10000000000,
      accounts: [privateKey]
    },
    bsc: {
      url: "https://bsc-dataseed1.ninicoin.io",
      chainId: 56,
      gasPrice: 5000000000,
      accounts: [privateKey]
    }
  },
  solidity: "0.8.2",
};
